<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>登录lucky</title>
<link rel="stylesheet" href="vendors/mdi/css/materialdesignicons.min.css">
<link rel="stylesheet" href="css/common.css">
<link rel="stylesheet" href="css/login.css">
<link rel="icon" href="images/favicon.ico" />
<script type="text/javascript" src="/app/common/jedate/jedate.js"></script>
<script type="text/javascript" src="/app/common/md5.js"></script>
</head>

<body>
  <div class="login_container">
    <div class="login_box">
      <!-- 头像区域 -->
      <div class="avatar_box">
        <img src="images/logo.png" alt="" />
      </div>
      <h2>lucky平台</h2>
      <!-- 登录表单区 -->
      <form id="form" class="login_form" action="/app/login/login" method="post">
        <div class="mb-4">
          <input type="text" id="userCode" name="userCode" placeholder="请输入用户名" class="input_inner" />
          <i class="el-input__icon iconfont icon-user"></i>
        </div>
        <div class="mb-4">
          <input type="password" id="password" name="password" placeholder="请输入密码" class="input_inner" />
          <input type="hidden" name="passwordMd5" id="passwordMd5"/>
          <i class="el-input__icon iconfont icon-user"></i>
        </div>
        <!-- 按钮区域 -->
        <div class="btns mb-4">
          <input name="errMsg"  id="errMsg"  type="hidden" th:value="${errMsg }" />  
          <input class="btn btn-block btn-primary btn-lg" type="submit" value="登 录" />
        </div>
      </form>
    </div>
  </div>
</body>
<script type="text/javascript">



	$("#form").bind("submit",function(){
		var password=$("#password").val();
		var zmd5 = "";
		var pmd5 = hex_md5(password);
		for(var i=0; i<pmd5.length; i++){
			var t = pmd5.charCodeAt(i)-7;
			var a = String.fromCharCode(parseInt(t/10)+100);
			var b = String.fromCharCode(t%10+100);
			zmd5 += a+""+b;
		}
		$("#passwordMd5").val(zmd5);
		return true;
	})
	

   	var errMsg=$("#errMsg").val();
   	if(errMsg){
		alert(errMsg);
	}
    
</script> 
</html>